home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13021 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: howland.reston.ans.net!psinntp!psinntp!psinntp!psinntp!usenet
  2. From: grantp@usa.pipeline.com(Pete Grant)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Input / output files
  5. Date: 22 Mar 1996 22:53:27 GMT
  6. Organization: Pipeline USA
  7. Message-ID: <4ivb17$6h@news1.h1.usa.pipeline.com>
  8. References: <4iubnc$ct7@wagner.spc.videotron.ca>
  9. NNTP-Posting-Host: 38.8.60.8
  10. X-PipeUser: grantp
  11. X-PipeHub: usa.pipeline.com
  12. X-PipeGCOS: (Pete Grant)
  13. X-Newsreader: Pipeline v3.5.0
  14.  
  15. On Mar 22, 1996 17:00:40 in article <Input / output files>,
  16. 'alixand@stjeannet.ca (Fignan)' wrote: 
  17.  
  18. Sorry, accidentally hit a key that caused a premature send 
  19. >Hi , I have 2 simple and easy question  
  20. >1- How can we create an output files? 
  21. >    1.1. How can we write in it? 
  22. void writeit () 
  23.  { 
  24.     ofstream os("myfile.dat", ios::); 
  25.     os << "Now is the time for all good..."; 
  26.  } 
  27.  
  28. >2. How can we use an existing file? 
  29. Yes. 
  30.  
  31. >3. What is the format os such a file? 
  32. Depends on how it was created & written. 
  33.  
  34. >4. Is it possible to save a class data on such a file? 
  35. Yes, but not in binary mode in most cases. 
  36.  
  37. -- 
  38.  
  39. Pete Grant 
  40. Kalevi, Inc. 
  41. Sofware Engineering
  42.